<template>
  <div class="home-icon-div">
    <slot></slot>
    <Icon
      type="md-arrow-round-back"
      class="home-icon"
      :size="34"
      @click="goHome"
      :title="iconTitle"
    />
  </div>
</template>

<script>
export default {
  props: {
    iconTitle: {
      default: "",
    },
  },
  methods: {
    goHome() {
      this.$router.back();
    },
  },
};
</script>
<style scoped lang="scss">
.home-icon-div {
  position: absolute;
  top: -4px;
  right: 20px;
  z-index: 2;
  .home-icon {
    cursor: pointer;
  }
}
</style>
